home *** CD-ROM | disk | FTP | other *** search
- Path: news.nask.org.pl!usenet
- From: flssoft@blue.maloka.waw.pl (Grzegorz (FLS))
- Newsgroups: comp.lang.c++
- Subject: Re: Problem with append.
- Date: Fri, 29 Mar 1996 18:43:00 GMT
- Organization: Research and Academic Computer Network
- Message-ID: <4jhaqp$hai@bilbo.nask.org.pl>
- References: <3156BF02.33A1@affinityedge.com>
- NNTP-Posting-Host: s111.maloka.waw.pl
- X-Newsreader: Forte Free Agent v0.46
-
-
- >out.open(filename, ios::app, 0);
-
- >if (!out) {
- > cout << "Cannot open ERROR log file.\n";
- > return(FALSE);
- > }
-
-
- >out.close();
-
- >This code works the first time, but if the file exists then the
- >routine hangs indefinitely.
-
- Hi,
-
- I assume, that you would write cout instead of out, or your out is
- cout based.
- I think, that if you change 'if (!out)' to 'if out.is_open()' it would
- work. Try it.
-
-
-